This invention relates to data processing systems; and in particular, it relates to methods of operating such systems.
Conventionally, a data processing system is operated by providing a program which consists of a sequence of instructions of some predetermined language. These instructions are executed one at a time; and the particular instruction that is currently being executed is pointed to by a program counter.
Each time the execution of an instruction is completed, the program counter is incremented to point to the next sequential instruction unless the completed instruction was a JUMP instruction or a CALL instruction. When a jump instruction is encountered, the program counter is loaded with a new address as the JUMP instruction directs; and then instructions are sequentially executed beginning at that new address. By comparison, when a CALL instruction is encountered, an independent procedure is executed and then control passes back to the instruction which follows the CALL instruction.
A procedure is a separate special purpose sequence of instruction from the same predetermined language of which the program that called it is made up. From the point of view of the calling program, a procedure can be regarded as a single new higher level instruction even though it may be quite complicated and made up of hundreds of instructions from the predetermined language.
By writing a collection of procedures, a programmer can define a new level instruction set. Then programs in the predetermined language can be written which use this new level instruction set by referring to them through the CALL instruction. Additional details on this prior art method of structuring or partitioning a program are found in the Prentice-Hall textbook entitled Structured Computer Organization by Andrew S. Tanenbaum, 1976, at pages 120-130.
One problem, however, with having a data processing system operate to execute a program which includes several CALL instructions and their corresponding procedures is that the system operates too slowly. This fact and the manner in which the execution speed can be greatly enhanced in accordance with the present invention is explained in detail in the following Detailed Description.
Still another problem with the prior art method of operating a data processing system by means of CALL instructions and corresponding procedures is that the operation is too inflexible. In particular, the operation is too confined to include special purpose microcode routines or special purpose hardware logic units that perform procedure-like functions.